<%@page import="com.scrum.Object.User"%>
<%@page import="com.scrum.Object.Catalog"%>
<%@page import="com.scrum.Object.Post"%>
<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Insert title here</title>
<link href="../css/bootstrap-theme.min.css" rel="stylesheet"
	type="text/css" />
<link href="../css/bootstrap.min.css" rel="stylesheet" type="text/css" />
<link href="../css/post_style.css" rel="stylesheet" type="text/css" />
<script type="text/javascript" src="../js/jquery-2.1.1.min.js"></script>
<script type="text/javascript" src="../js/bootstrap.min.js"></script>
<script type="text/javascript" src="../js/ckeditor.js"></script>
<style>
.boder-from {
 border: 1px solid #FFFF;
 
}
</style>
</head>
<body>
    <div class="navbar">
      <!-- Wrap the .navbar in .container to center it within the absolutely positioned parent. -->
      <!-- <div class="container"> -->

        <!-- <a class="brand" href="#"><img src="assets/img/logo.png" width='80px' height='75px'></a> -->
        <div class="navbar navbar-default">
          <div class="navbar-inner-top">
            <div class="container">
            <!-- Responsive Navbar Part 1: Button for triggering responsive navbar (not covered in tutorial). Include responsive CSS to utilize. -->
            <button type="button" class="btn btn-navbar" data-toggle="collapse" data-target=".nav-collapse">
              <span class="icon-bar"></span>
              <span class="icon-bar"></span>
              <span class="icon-bar"></span>
            </button>
            <!-- Responsive Navbar Part 2: Place all navbar contents you want collapsed withing .navbar-collapse.collapse. -->
            <a class="brand" href="#"></a>
            <div class="nav-collapse collapse">
              <ul class="nav">
                <!-- <li class="active"><a href="#">Home</a></li> -->
                <!-- Read about Bootstrap dropdowns at http://twbs.github.com/bootstrap/javascript.html#dropdowns -->
             
            </div><!--/.nav-collapse -->
            </div>
          </div><!-- /.navbar-inner -->
        </div><!-- /.navbar -->

      <!-- </div> /.container -->
      <div class="navbar navbar-inverse">
        <div class="navbar-inner">
          <div class="container">
            <div class="nav-collapse collapse">
              <ul class="nav">
                <li ><a href="#restaurants">Manager user</a></li>
                <li class="current"><a href="#recipes">Manager post</a></li>
                <li><a href="#about">Back home</a></li>
              </ul>
              <p class="navbar-form navbar-right right">
                <label class="active">Admin </label>  
                <a href="#">Trân Thanh Tâm</a> | <a href="#">Logout </a>
               </p>
            </div>
          </div>
        </div>
      </div>
    </div><!-- /.navbar-wrapper -->
    <%
    int post_id = Integer.parseInt(request.getParameter("postid"));
    Post post = Post.getPostById(post_id);
   String filePath = "../post/image/" + post.getImage();
    %>
 <div class="container">
	<form action="" style="margin-left: 200px; padding-top: 100px">
	<h2 style="font-family: Helvetica Neue, Helvetica, Arial, sans-serif; color: #0088cc; margin-left: 180px;"><%= post.getTitle() %></h2>
		 <table class="table table-hover">
			 	<tr>
		            <td width="100px"><label class="style-label">Image</label></td>
		            <td width="750px" height="100px"><img alt="" src="<%=filePath%>" height="150"	width="150" /></td>
		            </tr>
		            <tr>
		            <td width="100px"><label class="style-label">Catalog</label></td>
		            <td width="700px"><%= Catalog.convert(Catalog.getcatalog(post.getCatalog_id())) %></td>
		            </tr>
		            <tr>
		            <td width="100px"><label  class="style-label">Owner</label></td>
		            <td width="700px"><%= User.getUserById(post.getUser_id()).getUsername() %></td>
		            </tr>
		            <tr>
		            <td width="100px"><label  class="style-label">Content</label></td>
		            <td width="700px" height="250px"><%= post.getDescription() %></td>
		            </tr>
		            <tr>
		            <td width="100px"><label  class="style-label">Time</label></td>
		            <td width="700px"><%= post.getPost_time() %>
    				 </td>    
		          </tr>
	      </table>
	</form>
	</div>
</html>